<div  ng-include="'partials/common/crumb/crumb.html'"></div>
<div id="blockchain" ng-controller="blockchainCtrl" ng-init="init()">

	<div class="latest">
		<div class="table_title">{{'LATEST_BLOCK' | translate}}</div>
		<div class="search">
			<input type="text" ng-model="search" placeholder="{{'INPUT_SEARCH_CONTENT' | translate}}">
			<a class="search_icon" ng-click="searchBlock()"><img src="../assets/common/search.png" alt=""></a>
		</div>
	</div>
	<div class="deal_table">
		<table class="table" ng-table="blockchaintableparams" border="0" width="100%" cellpadding="0" cellspacing="0"
			   template-pagination="custom/pager" >
			<thread>
				<tr>
					<td>{{'HEIGHT' | translate}}</td>
					<td>{{'DATE' | translate}}</td>
					<td>ID</td>
					<td>{{'PRODUCER' | translate}}</td>
					<td>{{'TRANSACTIONS' | translate}}</td>
					<td>{{'TOTAL' | translate}} {{'AMOUNTS' | translate}}</td>
					<td>{{'TOTAL' | translate}} {{'FEES' | translate}}</td>
					<td>{{'REWARDS' | translate}}</td>
				</tr>
			</thread>
			<tr ng-repeat="i in $data"  >
				<td> <i class="level" ng-click="showdetailInfo(i)">{{i.height}}</i></td>
				<td><span ng-show="i.timestamp > 0">{{i.timestamp | timestampFilter}}</span></td>
				<td><i class="level" ng-click="showdetailInfo(i)">{{i.id}}</i></td>
				<td><i class="level" ng-click="showaccountdetailInfo(i.generatorId)">{{i.generatorId}}</i></td>
				<td><i class="level" ng-click="showdealInfo(i)">{{i.numberOfTransactions}}</i></td>
				<td>{{i.totalAmount  | xasFilter }}</td>
				<td>{{i.totalFee | xasFilter}}</td>
				<td>{{i.reward | xasFilter}}</td>
			</tr>
		</table>

		<script type="text/ng-template" id="custom/pager">
			<ul class="pagination ng-table-pagination">
				<li ng-class="{'disabled': !page.active && !page.current, 'active': page.current}" ng-repeat="page in pages" ng-switch="page.type">
					<a ng-switch-when="prev" ng-click="params.page(page.number)" href="">
						<i class="mdi-hardware-keyboard-arrow-left">{{'PREV_PAGE' | translate}}</i>
					</a>
					<a ng-switch-when="first" ng-click="params.page(page.number)" href="">
						<span ng-bind="page.number"></span>
					</a>
					<a ng-switch-when="page" ng-click="params.page(page.number)" href="">
						<span ng-bind="page.number"></span>
					</a>
					<a ng-switch-when="more" ng-click="params.page(page.number)" href="">&#8230;</a>
					<a ng-switch-when="last" ng-click="params.page(page.number)" href="">
						<span ng-bind="page.number"></span>
					</a>
					<a ng-switch-when="next" ng-click="params.page(page.number)" href="">
						<i class="mdi-hardware-keyboard-arrow-right">{{'NEXT_PAGE' | translate}}</i>
					</a>
				</li>
				<!--<button ng-click="params.page(inputPage)">跳转到</button>-->
				<!--<input type="text" placeholder="" ng-model="inputPage">-->
			  <!--<label>页</label>-->
			</ul>
		</script>
	</div>


</div>